package com.hhl.test;

import com.alibaba.fastjson.JSONObject;
import com.hhl.util.HttpRequestUtil;
import com.hhl.util.WXURLUtil;
import com.hhl.util.WechatAccessToken;

/**
 * @desc:
 * @author: hhl
 * @date：2022/10/8 11:34
 */
public class menutest4 {

    public static void main(String[] args) {

        String token = "64_iBrdTBnoK32bJ2wtyxT2nardG9oEa415jbKsbqfTnpnWyblnMXZR87JV7ZuuSZ6fFe1yIER-6ok1aG9f5nMsJ7ckvBA3nQglN5IkM44SDmBqtvmzZSXgMZ0V-yEPEYcAFAYNH";
        String param = "{\"button\":[{\"key\":\"2\",\"url\":\"http://mp.weixin.qq.com\",\"name\":\"患者管理\",\"type\":\"miniprogram\",\"appId\":\"wx28dc54d9dd90e73e\",\"appid\":\"wxf6d0f6314d927fee\",\"pagepath\":\"pages/index/index\"}]}";

        JSONObject bbb = HttpRequestUtil.httpRequest(WXURLUtil.MENU_URL.replace("ACCESS_TOKEN", token), "POST", param);
        System.out.println(JSONObject.toJSONString(bbb));


    }
}
